<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page isELIgnored="false"%>
<html>
<head>
    <title>运单拓展信息管理</title>
    <style>
        .table-responsive{
            overflow: auto; width: 100%;
        }
        .table {
            white-space: nowrap;
            overflow:scroll;
            width: inherit;
        }
        .table td {
            white-space: nowrap;
            text-overflow: ellipsis;
        }
    </style>
</head>
<body>
    <div ng-app="myApp" ng-controller="LogisticsExtendCtrl">
        <div class="row">
            <ui-container url="system/extend/list" key="extends-list-00">
                <ui-search-form>
                    <search-date format="yyyy-mm" class="col-md-3" name="salaryMonth" placeholder="请输入订单完结所在月份"   value= "{{dateValue}}" ></search-date>
                    <search-input class="col-md-2" name="waybillNum" placeholder="请输入运单号"></search-input>
                    <search-input class="col-md-2" name="businessCode" placeholder="请输订单号"></search-input>
                    <search-select class="col-md-2" name="major" >
                        <option value="">首拖件</option>
                        <option value="0">非</option>
                        <option value="1">是</option>
                    </search-select>
                    <search-select class="col-md-2" name="feeCommitted" >
                        <option value="">是否已提交配费</option>
                        <option value="0">非</option>
                        <option value="1">是</option>
                    </search-select>
                </ui-search-form>
                <ui-table-tool>
                </ui-table-tool>
                <ui-table>
                    </ui-form>
                </ui-table>
                <table-page/>
            </ui-container>
        </div>
    </div>
<script>
    angular.module('myApp',['ui.table']);
    angular.module('myApp').controller('LogisticsExtendCtrl', function($scope){
        $scope.dateValue = new Date().format("yyyy-MM");

        $scope.addOrg = function (items) {
            console.info(items)
        }

        $scope._columns=[ {name:'id',head:'id'},
            {name:'waybillNum',head:'运单号'},
            {name:'businessCode',head:'订单号'},
            {name:'dataValid',head:'基础字段完整'},
            {name:'feeCommitted',head:'是否已提交配费',render(data,value){
                return value == 0 ? '否' : '是' ;
            }},
            {name:'calculateType',head:'结算类型',render(data,value){
                switch (value + ''){
                    case "0" :
                        return "按件";
                    case "1" :
                        return "按重";
                    case "2" :
                        return "混合";
                    default :
                        return "未知";
                }
            }},
            {name:'sectionId',head:'按件或按重规则ID'},
            {name:'fee',head:'配费'},
            {name:'major',head:'主件/拖件/零价件',render(data,value){
                switch (value + ''){
                    case "0" :
                        return "主件";
                    case "1" :
                        return "拖件";
                    case "2" :
                        return "零价件";
                    default :
                        return "未知";
                }
            }}
        ];

    });
</script>
</body>
</html>
